<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
Object obj=request.getSession().getAttribute("role_resource");
if(null==obj){
	response.setStatus(1000);
	return;
}
%> 
		<script type="text/javascript">
			var store = new Ext.data.JsonStore( {
				fields: [ "a","b","c", "d", "e", "f", "g", "h"],
				data: [{a:"2011-09",b:"深圳市",c:"上海远洋",d:"1000",e:"200",f:"100",g:"800",h:"1.10"}]
			});
			//重写resize事件,使panel自适应
			var centerpanelsize = Ext.getCmp("CenterPanel");
			centerpanelsize.on({
				"resize":function(p,newwidth,newheight){
					Ext.getCmp("p").setSize(newwidth,newheight-27);	
					Ext.getCmp("panel").setSize(newwidth,newheight-27);	
				}
			});
			var areacost_pel = new Ext.Panel( {
				id: "panel",				
				border : false, 						
				layout: "card",
				activeItem:0,
				items:[{
					id: "p",
					xtype:"grid",
					store: store,
					stripeRows: true,
					loadMask: true,
					border : false,
					boxMinHeight: 300,
					autoExpandColumn: "h",
					autoExpandMin: 100,
					headersDisabled: true,
					columns:[
						new Ext.grid.RowNumberer( {header : "序号",	width : 35}), 
					    {dataIndex : "a",	header : "帐期",			width: 140,	menuDisabled: true},
					    {dataIndex : "b",	header : "城市",			width: 140,	menuDisabled: true},
					    {dataIndex : "c",	header : "外包商",		width: 140,	menuDisabled: true},
					    {dataIndex : "d",	header : "数量（份）",	width: 140,	menuDisabled: true},  
					    {dataIndex : "e",	header : "印刷费（元）",	width: 140,	menuDisabled: true},  
					    {dataIndex : "f",	header : "服务费（元）",	width: 140,	menuDisabled: true},  
					    {dataIndex : "g",	header : "邮费（元）",	width: 140,	menuDisabled: true},
					    {dataIndex : "h",	header : "小计（元）",	id:"h",	menuDisabled: true}
					],
					tbar:[
						{text: "期别:"},
						{xtype:	"datefield",	format:"Y-m",	editable :false},
						{text: "--"},
						{xtype:	"datefield",	format:"Y-m",	editable :false},
						{xtype:	"checkbox",		boxLabel:"按月统计"},
						{pressed: true,		text :"查询"}
					],
					bbar: new Ext.ux.PagingToolbar({
						pageSize: limit,
						store : store
					})
				}]
			});
			
	var CenterPanel=Ext.getCmp("CenterPanel");
	CenterPanel.removeAll();
	CenterPanel.add(areacost_pel);
	CenterPanel.doLayout();
</script>